<div class="dux-page">
    <div class="page-header">
        保存地址
    </div>
    <div class="page-box">
        <form class="dux-form am-form am-form-horizontal" action="{url()}" method="post" data-dux="form-bind"
              id="distpicker">

            <div class="am-form-group">
                <label class="am-form-label">姓名</label>
                <div class="am-form-content">
                    <input type="text"  placeholder="收件人姓名" name="name"  value="{$info.name}">
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-form-label">电话</label>
                <div class="am-form-content">
                    <input type="text"  placeholder="收件人电话" name="tel"  value="{$info.tel}">
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-form-label">省份</label>
                <div class="am-form-content">
                    <select name="province" data-province="{$info.province}"></select>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-form-label">城市</label>
                <div class="am-form-content">
                    <select name="city" data-city="{$info.city}"></select>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-form-label">地区</label>
                <div class="am-form-content">
                    <select name="region" data-district="{$info.region}"></select>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-form-label">地址</label>
                <div class="am-form-content">
                    <input type="text"  placeholder="详细地址到门牌号" name="address"  value="{$info.address}">
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-form-label">邮编</label>
                <div class="am-form-content">
                    <input type="text"  placeholder="邮政编码" name="zip"  value="{$info.zip}">
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-form-label">默认</label>
                <div class="am-form-content">
                    <div class="am-padding-top-xs">
                        <label>
                        <!--if{$info.default}-->
                        <input type="checkbox" name="default" value="1" checked>
                        <!--{else}-->
                        <input type="checkbox" name="default" value="1">
                        <!--{/if}-->
                        (勾选设置为默认地址)
                        </label>
                    </div>
                </div>
            </div>

            <div class="am-form-group">
                <div class="am-form-content">
                    <input name="add_id" value="{$info.add_id}" type="hidden">
                    <button type="submit" class="am-btn am-btn-danger am-btn-sm">保存地址</button>
                </div>
            </div>


        </form>
    </div>
</div>

<script>
    Do('distpicker', function () {
        $(function () {
            $('#distpicker').distpicker();
        });
    });
</script>